import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import * as Config from './config';
import Utils from './utils';
import VTS from 'vue-toast-response';
import vueEsign from 'vue-esign';
import Toast from './lib/toast';
import Frame from './components/Frame';
import FrameContent from './components/FrameContent';
import Popup from './components/Popup';
import SMSPopup from './components/SMSPopup';
import Img from './components/Img';
// import FastClick from 'fastclick';

import mixins from './mixins';

Vue.mixin(mixins);

import './assets/css/reset.css';
import './assets/css/layout.css';
import './assets/fonts/iconfont.css';
import './assets/css/fix-iconfont.css';
import 'vue-toast-response/maybe/vue-toast-response.css';

import Button from './components/Button';
import ButtonGroup from './components/ButtonGroup';
import DatePicker from './components/DatePicker';

Vue.component(Button.name, Button);
Vue.component(ButtonGroup.name, ButtonGroup);
Vue.component(DatePicker.name, DatePicker);

Vue.use(VTS);
Vue.use(vueEsign);
Vue.use(Frame);
Vue.use(FrameContent);
Vue.use(Popup);
Vue.use(SMSPopup);
Vue.use(Img);

Vue.config.productionTip = false;
Vue.prototype.$config = Config;
Vue.prototype.$utils = Utils;
Vue.prototype.$toast = Toast;

new Vue({
    store,
    router,
    render: (h) => h(App),
}).$mount('#app');

// if ('addEventListener' in document) {
//   document.addEventListener('DOMContentLoaded', function() {
//     FastClick.attach(document.body);
//   }, false);
// }

// 修复IOS下:active伪类无法生效的问题
document.body.addEventListener('touchstart', () => {}, false);
